/* SPDX-License-Identifier: GPL-2.0 */
/*
 * Copyright (c) Huawei Technologies Co., Ltd. 2018-2023.
 * Description: irq: merge high-precision timer can reduce interrupts and context switches
 * Author: langfei
 * Create: 2023-12-15
 */

#ifndef _APIC_HIGH_PRECISION_H_
#define _APIC_HIGH_PRECISION_H_

#ifdef CONFIG_EULEROS_MERGE_TIMER_IRQ

DECLARE_PER_CPU(int, period_divisor);

extern int deadline_delta_func(unsigned long delta);
extern void change_to_deadline(void *arg);
extern void change_to_period(void *arg);
#else
static inline int deadline_delta_func(unsigned long delta)
{
	return -1;
}
#endif /* CONFIG_EULEROS_MERGE_TIMER_IRQ */

#endif /* _APIC_HIGH_PRECISION_H_ */

